<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <title>init.pp</title>
  <link rel="stylesheet" href="http://jashkenas.github.com/docco/resources/docco.css">
</head>
<body>
<div id='container'>
  <div id="background"></div>
  <div id="jump_to">
    Jump To &hellip;
    <div id="jump_wrapper">
      <div id="jump_page">
          <a class="source" href="deploy.html">deploy.pp</a>
          <a class="source" href="extract.html">extract.pp</a>
          <a class="source" href="file.html">file.pp</a>
          <a class="source" href="init.html">init.pp</a>
      </div>
    </div>
  </div>
  <table cellspacing=0 cellpadding=0>
  <thead>
    <tr>
      <th class=docs><h1>init.pp</h1></th>
      <th class=code></th>
    </tr>
  </thead>
  <tbody>
    <tr id='section-Class:_staging'>
      <td class=docs>
        <div class="pilwrap">
          <a class="pilcrow" href="#section-Class:_staging">&#182;</a>
        </div>
        <h3>Class: staging</h3>

<p>This module manages staging and extraction of files from various sources.</p>

<h4>Actions:</h4>

<p>Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name.</p>

<p>   /opt/staging/</p>

<pre><code>          |-- puppet
          |   `-- puppet.enterprise.2.0.tar.gz
          `-- tomcat
              `-- tomcat.5.0.tar.gz
</code></pre>

<h3>Parameters:</h3>

<ul>
<li>[<em>path</em>]:  staging directory filepath (default: &lsquo;/opt/staging&rsquo;)</li>
<li>[<em>owner</em>]:  staging directory owner (default: &lsquo;0&rsquo;)</li>
<li>[<em>group</em>]:  staging directory group (default: &lsquo;0&rsquo;)</li>
<li>[<em>mode</em>]:  staging directory permission (default: &lsquo;0755&rsquo;)</li>
</ul>


<h3>Usage:</h3>

<pre><code>include staging
</code></pre>

      </td>
      <td class=code>
        <div class='highlight'><pre><span class="k">class</span> <span class="n">staging</span> <span class="p">(</span>
  <span class="vg">$path</span>  <span class="o">=</span> <span class="s1">&#39;/opt/staging&#39;</span><span class="p">,</span> 
  <span class="vg">$owner</span> <span class="o">=</span> <span class="s1">&#39;0&#39;</span><span class="p">,</span>            
  <span class="vg">$group</span> <span class="o">=</span> <span class="s1">&#39;0&#39;</span><span class="p">,</span>            
  <span class="vg">$mode</span>  <span class="o">=</span> <span class="s1">&#39;0755&#39;</span>          
<span class="p">)</span> <span class="p">{</span>

  <span class="n">file</span> <span class="p">{</span> <span class="vg">$path</span><span class="p">:</span>
    <span class="k">ensure</span> <span class="o">=&gt;</span> <span class="n">directory</span><span class="p">,</span>
    <span class="n">owner</span>  <span class="o">=&gt;</span> <span class="vg">$owner</span><span class="p">,</span>
    <span class="n">group</span>  <span class="o">=&gt;</span> <span class="vg">$group</span><span class="p">,</span>
    <span class="n">mode</span>   <span class="o">=&gt;</span> <span class="vg">$mode</span><span class="p">,</span>
  <span class="p">}</span>

<span class="p">}</span></pre></div>
      </td>
    </tr>
  </table>
</div>
</body>
